home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
comms
/
html-heaven
/
iso2html1.lha
/
projects
/
iso2html
/
iso2html.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-10
|
1KB
|
110 lines
char *vers = "\0$VER: iso2html 1.0 (08.08.95)";
/*
convert ISO Latin 1 alphabet to html entities.
given to the PD by Ch. Ruetgers 1995.
chr@quack.westfalen.de
*/
#include <stdio.h>
#include <string.h>
#define BUFSIZE 60000
char *entiti[] = {
"À",
"&AAcute;",
"Â",
"Ã",
"Ä",
"Å",
"Æ",
"Ç",
"È",
"É",
"Ê",
"Ë",
"Ì",
"Í",
"Î",
"Ï",
"Ð",
"Ñ",
"Ò",
"Ó",
"Ô",
"Õ",
"Ö",
" ;",
"Ø",
"Ù",
"Ú",
"Û",
"Ü",
"Ý",
"Þ",
"ß",
"à",
"á",
"â",
"ã",
"ä",
"å",
"æ",
"ç",
"è",
"é",
"ê",
"ë",
"ì",
"í",
"î",
"ï",
"ð",
"ñ",
"ò",
"ó",
"ô",
"õ",
"ö",
" ;",
"ø",
"ù",
"ú",
"û",
"ü",
"ý",
"þ",
"ÿ"
};
int i,n,p;
unsigned char buffer[BUFSIZE];
main()
{
while(!feof(stdin))
{
if(fgets(buffer,BUFSIZE, stdin))
{
for(i=0;i<strlen(buffer);i++)
{
n=buffer[i];
if(n >= 192)
{
p=n-192;
printf("%s",entiti[p]);
}
else
{
printf("%c",n);
}
}
}
}
}